<template>
  <div class="list_body">
    <div class="list_body_item" v-for="(item,index) in listData" :key="index" @click="$router.push({name:'OnlineSeekContent',query:{problem_id:item.id,problem_title:item.title}})">
      <div class="list_body_title">
        <span>{{index + 1}}.</span>
        <span>{{item.title}}</span>
      </div>
      <!-- <div class="list_body_dec">
        <span>发送给{{item.name}}</span>
      </div> -->
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      listData: []
    };
  },
  mounted(){
    this.$axios.post("api/problem/lookLeaveMessage",
    'userId=' + this.$cookie.getCookie("id")).then(({data})=>{
      this.listData = data.data;
      // console.log(data.data)
    })
  }
};
</script>

<style>
.list_body {
  width: 1000px;
  /* padding: 10px; */
  margin: auto;
  min-height: var(--globalHeight);
  box-sizing: border-box;
}
.list_body_item {
  cursor: pointer;
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
  transition: background 1s;
}
.list_body_item:hover{
  background-color: skyblue;
}
.list_body_title{
  font-weight: bold;
}
.list_body_dec{
  margin-top: 5px;
  font-size: 13px;
  color: gray;
}
@media screen and (max-width: 1000px) {
  .list_body {
    width: 100%;
  }
}
@media screen and (max-width: 768px) {
  .list_body {
    background-color: #fff;
  }
}
</style>